home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / text+faqs / trekguide / trek.install < prev    next >
Text File  |  1996-02-26  |  7KB  |  323 lines

  1. ; Installer Script for Trek-The Guide v1.5
  2. ; 07/31/95  James L. Hines
  3.  
  4. ; set up an error cleanup routine
  5. (onerror
  6.     (makeassign "STsrc" (safe))
  7.     (makeassign "STdest" (safe))
  8. )
  9.  
  10. ;started
  11. (complete 0)
  12.  
  13. ;cancel the assign in case of installation restart
  14. (makeassign "STsrc" (safe))
  15. (makeassign "STdest" (safe))
  16.  
  17. ; get the dest dir for Trek-The Guide (create it if it does not exist)
  18. (set st_dest
  19.     (tackon
  20.         (askdir
  21.             (prompt "Where should Trek-The Guide be installed? A drawer named `TrekGuide' will be created there.")
  22.             (help @askdir-help)
  23.             (default @default-dest)
  24.         )
  25.         "TrekGuide"
  26.     )
  27. )
  28. (makeassign "STdest"
  29.     (pathonly st_dest)
  30.     (safe)
  31. )
  32. (if (exists "STdest:TrekGuide")
  33.     (+ 1 1)
  34.     (makedir
  35.         "STdest:TrekGuide"
  36.         (infos)
  37.         (safe)
  38.     )
  39. )
  40.  
  41. ;We now have a valid destination, so tell Installer where ST will end up
  42. ;so the exit page will be correct.
  43. (set @default-dest st_dest)
  44.  
  45.  
  46. ;Copy the LHEX program to ram:
  47. (copyfiles
  48.     (source "STGDemo:c/lhex")
  49.     (dest "ram:")
  50. )
  51. (copyfiles
  52.     (source "STGDemo:Trek-Readme")
  53.     (dest "STdest:TrekGuide")
  54.     (infos)
  55. )
  56.  
  57.  
  58. ;copy program files from source to dest
  59.         (copyfiles
  60.             (source "STGDemo:Trek-The.Guide")
  61.             (dest "STdest:TrekGuide")
  62.             (infos)
  63.         )
  64.  
  65. (complete 20)
  66.  
  67. ;copy program files from source to dest
  68.         (copyfiles
  69.             (source "STGDemo:TrekGuide.index")
  70.             (dest "STdest:TrekGuide")
  71.             (infos)
  72.         )
  73.  
  74. (complete 23)
  75.  
  76. ;copy program files from source to dest
  77.         (copyfiles
  78.             (source "STGDemo:TG_Cartoons")
  79.             (dest "STdest:TrekGuide")
  80.             (infos)
  81.         )
  82.  
  83. (complete 26)
  84.  
  85. ;copy program files from source to dest
  86.         (copyfiles
  87.             (source "STGDemo:TG_Collectables")
  88.             (dest "STdest:TrekGuide")
  89.             (infos)
  90.         )
  91.  
  92. (complete 28)
  93.  
  94. ;copy program files from source to dest
  95.         (copyfiles
  96.             (source "STGDemo:TG_DS9")
  97.             (dest "STdest:TrekGuide")
  98.             (infos)
  99.         )
  100.  
  101. (complete 30)
  102.  
  103. ;copy program files from source to dest
  104.         (copyfiles
  105.             (source "STGDemo:TG_MSC")
  106.             (dest "STdest:TrekGuide")
  107.             (infos)
  108.         )
  109.  
  110. (complete 32)
  111.  
  112. ;copy program files from source to dest
  113.         (copyfiles
  114.             (source "STGDemo:TG_Novels")
  115.             (dest "STdest:TrekGuide")
  116.             (infos)
  117.         )
  118.  
  119. (complete 34)
  120.  
  121. ;copy program files from source to dest
  122.         (copyfiles
  123.             (source "STGDemo:TG_Orig")
  124.             (dest "STdest:TrekGuide")
  125.             (infos)
  126.         )
  127.  
  128. (complete 36)
  129.  
  130. ;copy program files from source to dest
  131.         (copyfiles
  132.             (source "STGDemo:TG_STMP")
  133.             (dest "STdest:TrekGuide")
  134.             (infos)
  135.         )
  136.  
  137. (complete 38)
  138.  
  139. ;copy program files from source to dest
  140.         (copyfiles
  141.             (source "STGDemo:TG_TNG")
  142.             (dest "STdest:TrekGuide")
  143.             (infos)
  144.         )
  145.  
  146. (complete 40)
  147.  
  148. ;copy program files from source to dest
  149.         (copyfiles
  150.             (source "STGDemo:TG_Voyager")
  151.             (dest "STdest:TrekGuide")
  152.             (infos)
  153.         )
  154.  
  155.  
  156. ;copy program files from source to dest
  157.         (copyfiles
  158.             (source "STGDemo:TG_Trivia")
  159.             (dest "STdest:TrekGuide")
  160.             (infos)
  161.         )
  162.  
  163. (complete 41)
  164.  
  165. ;copy program files from source to dest
  166.         (copyfiles
  167.             (source "STGDemo:Trekguide.rexx")
  168.             (dest "STdest:TrekGuide")
  169.             (infos)
  170.         )
  171.  
  172. ;copy program files from source to dest
  173.         (copyfiles
  174.             (source "STGDemo:Trekguide.info")
  175.             (dest "STdest:TrekGuide")
  176.             (infos)
  177.         )
  178.  
  179. (complete 42)
  180.  
  181. ;copy program files from source to dest
  182.         (copyfiles
  183.             (source "STGDemo:Trek.Doc")
  184.             (dest "STdest:TrekGuide")
  185.             (infos)
  186.         )
  187.  
  188.  
  189. (complete 44)
  190.  
  191. ;copy rexx files from source to dest
  192.         (if (exists "STdest:TrekGuide/TRx")
  193.             (+ 1 1)
  194.             (makedir
  195.                 "STdest:TrekGuide/TRx"
  196.                 (safe)
  197.             )
  198. )
  199.  
  200. ;copy program files from source to dest
  201.         (copyfiles
  202.             (source "STGDemo:trx/about")
  203.             (dest "STdest:TrekGuide/TRx")
  204.         )
  205.  
  206. ;copy program files from source to dest
  207.         (copyfiles
  208.             (source "STGDemo:trx/MV.rexx")
  209.             (dest "STdest:TrekGuide/TRx")
  210.         )
  211.  
  212. ;copy program files from source to dest
  213.         (copyfiles
  214.             (source "STGDemo:trx/Pics.rexx")
  215.             (dest "STdest:TrekGuide/TRx")
  216.         )
  217.  
  218. ;copy program files from source to dest
  219.         (copyfiles
  220.             (source "STGDemo:trx/VCR.rexx")
  221.             (dest "STdest:TrekGuide/TRx")
  222.         )
  223.  
  224.  
  225. ;copy program files from source to dest
  226.         (copyfiles
  227.             (source "STGDemo:prefs/env-archive/trekguide.prefs")
  228.             (dest "envarc:")
  229.         )
  230.  
  231. ;copy program files from source to dest
  232.         (copyfiles
  233.             (source "STGDemo:TG_Screen.rexx")
  234.             (dest "STdest:TrekGuide")
  235.         )
  236.  
  237. ;copy program files from source to dest
  238.         (copyfiles
  239.             (source "STGDemo:TG_Screen.info")
  240.             (dest "STdest:TrekGuide")
  241.         )
  242.  
  243.  
  244. (complete 46)
  245.  
  246. ;copy library files from source to dest with version checking
  247.         (copylib
  248.             (source "STGDemo:Libs/arp.library")
  249.             (dest "libs:")
  250.         )
  251.  
  252. ;copy library files from source to dest with version checking
  253.         (copylib
  254.             (source "STGDemo:Libs/rexxarplib.library")
  255.             (dest "libs:")
  256.         )
  257.  
  258. ;copy library files from source to dest with version checking
  259.         (copylib
  260.             (source "STGDemo:Libs/iff.library")
  261.             (dest "libs:")
  262.         )
  263.  
  264. ;copy library files from source to dest with version checking
  265.         (copylib
  266.             (source "STGDemo:Libs/rexxreqtools.library")
  267.             (dest "libs:")
  268.         )
  269.  
  270. ;copy pic files from source to dest
  271.         (if (exists "STdest:TrekGuide/TrekPics")
  272.             (+ 1 1)
  273.             (makedir
  274.                 "STdest:TrekGuide/TrekPics"
  275.                 (infos)
  276.                 (safe)
  277.             )
  278. )
  279.  
  280. ;copy program files from source to dest
  281.         (copyfiles
  282.             (source "STGDemo:TrekPics")
  283.             (dest "STdest:TrekGuide/TrekPics")
  284.         (all)
  285.         )
  286.  
  287.  
  288. ;add the assign for TrekGuide: to user-startup
  289. (set stassign ("Assign TrekGuide: \"%s\"\n" st_dest))
  290. (startup
  291.         "TrekGuide"
  292.         (prompt "Trek-The Guide requires that an AmigaDOS assign be created. It WILL NOT work properly without it! The following will be added to your s:user-startup file:\n\n"
  293.             stassign
  294.             "\nIs it okay to add this now?"
  295.             "\n\nIMPORTANT: REBOOT YOUR COMPUTER BEFORE RUNNING TREK-THE GUIDE FOR THE FIRST TIME.")
  296.         (help @startup-help)
  297.         (command stassign)
  298. )
  299.  
  300. (complete 95)
  301.  
  302. ;un-snapshot the Star Trek drawer icon
  303. (tooltype
  304.     (dest st_dest)
  305.     (noposition)
  306. )
  307.  
  308. ;remove the LHX program
  309. (delete "ram:lhex")
  310.  
  311. ;finished with install
  312. (complete 100)
  313.  
  314. ;cleanup
  315. (makeassign "STsrc" (safe))
  316. (makeassign "STdest" (safe))
  317.  
  318. ;display the readme file
  319. (run "run STGDemo:c/more STGDemo:Trek.doc" (safe))
  320.  
  321. ;leave
  322. (exit)
  323.